Skip to content

Set MSSQL driver identity and Python User-Agent version - #992

Merged
saurabh500 merged 9 commits into
mainfrom
dev/saurabh/miniature-winner
Oct 9, 2026
Merged

saurabh500 merged 9 commits into
mainfrom
dev/saurabh/miniature-winner

Conversation

@saurabh500

@saurabh500 saurabh500 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

SQL Server currently sees the generic MS-TDS driver and TDSX Rust Client application names. Identify ConnectorX connections explicitly, following the mssql-py-core approach in microsoft/mssql-rs.

  • Set the LOGIN7 library name to mssql-tds and the User-Agent library name to connectorx (lowercase).
  • Default the application name to ConnectorX, preserving explicit appname URL overrides.
  • Initialize the User-Agent driver version from installed Python package metadata, matching connectorx.__version__ including prerelease suffixes. Leave the numeric LOGIN7 version unchanged.
  • Include the Python interpreter version in the User-Agent runtime field as Python major.minor.micro, using the numeric fields from sys.version_info without parsing the verbose version string.
  • Initialize package version and runtime together once; reject empty or conflicting values. Rust-only builds retain upstream version/runtime defaults unless explicitly configured.

Validation

  • Six TDS configuration tests passed, covering library/application names, package version and runtime, repeat initialization, invalid/conflicting values, and unchanged LOGIN7 version.
  • Rebuilt and imported the Python extension successfully after the concise runtime change: package version 0.4.7a1, runtime Python 3.12.3.
  • The session identity regression passed against SQL Server 2022 in local Docker, covering default and overridden application names.

saurabh500 and others added 2 commits October 1, 2026 22:55
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.09%. Comparing base (76a021f) to head (ebdb288).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #992      +/-   ##
==========================================
+ Coverage   44.36%   45.09%   +0.72%     
==========================================
  Files          65       65              
  Lines        9595     9552      -43     
==========================================
+ Hits         4257     4307      +50     
+ Misses       5338     5245      -93     
Files with missing lines Coverage Δ
connectorx/src/sources/mssql/mod.rs 100.00% <ø> (ø)
connectorx/src/sources/mssql/tds_impl.rs 85.64% <100.00%> (+1.17%) ⬆️

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

saurabh500 and others added 4 commits October 1, 2026 23:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@saurabh500
saurabh500 marked this pull request as ready for review October 2, 2026 23:32
saurabh500 and others added 3 commits October 3, 2026 00:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@saurabh500
saurabh500 merged commit a7b7fd2 into main Oct 9, 2026
3 checks passed
@saurabh500
saurabh500 deleted the dev/saurabh/miniature-winner branch October 9, 2026 14:08
Vahid-b added a commit to Vahid-b/connector-x that referenced this pull request Oct 9, 2026
…tions arg

After rebasing onto sfu-db#992, its new unit tests call build_client_context
with the old one-argument signature.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants